As the last session, we will try to play a bit with single-cell RNAseq data. Most of you might already have single-cell RNAseq datasets, which are analysed by me or Ahmad at one point.
In this session, we will play a bit about single-cell RNAseq data, like changing the resolution and get the clusters and getting violin plot.
For single-cell RNAseq data analysis and plotting, we need some specific packages. We will install one by one.
Seurat is the tools for the single-cell RNAseq data, covering from the pre-process to the downstream analysis. We will mainly use this package to proceed and calculate the UMAP.
install.packages('Seurat')
install.packages(c("patchwork", "data.table", "magrittr"))
When the packages are all installed, please attach them on your environment.
library(Seurat)
library(ggplot2)
library(patchwork)
library(tidyverse)
library(data.table)
library(magrittr)
Here, we will not play with the data pre-process by our own. For the data pre-process, bioinformaticians mainly check the quality of data and trim out the bad quality of cells or reads. This is not recommended on your personal laptop, since it requires large capacity of memory.
Here, we will start from the data, which is already trimmed and ready to work on the process. This data is already including the linear dimensional reduction, so ready to define the cluster.
seuset <- readRDS("Preproceeded_scRNA.rds")
seuset
An object of class Seurat
20043 features across 5566 samples within 1 assay
Active assay: RNA (20043 features, 2000 variable features)
1 dimensional reduction calculated: pca
On Seurat, it applies a graph-based clustering approach to define the cluster. Importantly, the distance metric which drives the clustering analysis (based on previously identified PCs) remains the same.
Seurat has two steps to cluster the cells. First step is constructing the KNN graph based ont he euclidean distance on PCA. Then, refine the edge weights between any two cells, based on the shared overlap in their local neighbourhood.
Since Seurat uses the dimensions on the PCA to calculate cluster, so we will define how many of PCs to use for the definition of cluster on our sample.
Usually, we decide the number of PCs where the lower plateau starts to be sure. In other words, we choose the point where the variability is not too considerable. Here, we will take first 30 PCs for defining the cluster.
If we use more dimension it cause more clusters, this should be see more in detail. However, if you take too high dimension than the proper PCs, it will cause over-clustering or bring difficulties on the interpretation.
seuset <- FindNeighbors(seuset, dims = 1:30)
Computing nearest neighbor graph
Computing SNN
When the nearest neighbour is calculated based on the PCs we decided, we need to find the clusters with the specific resolutions you will apply. Resolution is same as the magnification of the lenses on the microscope, so if you set the high resolution, you will get more clusters with details.
For setting the resolution, you could test several different resolutions and then decide which one is the proper value for your data. Usually three to four values are tested, and check whether the clusters are too vague or over-clustered.
Here, we will put the value as 0.3 for practice.
seuset <- FindClusters(seuset, resolution = 0.3)
Modularity Optimizer version 1.3.0 by Ludo Waltman and Nees Jan van Eck
Number of nodes: 5566
Number of edges: 197064
Running Louvain algorithm...
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Maximum modularity in 10 random starts: 0.9618
Number of communities: 17
Elapsed time: 0 seconds
Seurat offers several non-linear dimensional reduction techniques, such as tSNE and UMAP, to visualize and explore these datasets.
seuset <- RunUMAP(seuset, dims = 1:30)
Warning: The default method for RunUMAP has changed from calling Python UMAP via reticulate to the R-native UWOT using the cosine metric
To use Python UMAP via reticulate, set umap.method to 'umap-learn' and metric to 'correlation'
This message will be shown once per session
14:51:19 UMAP embedding parameters a = 0.9922 b = 1.112
14:51:19 Read 5566 rows and found 30 numeric columns
14:51:19 Using Annoy for neighbor search, n_neighbors = 30
14:51:19 Building Annoy index with metric = cosine, n_trees = 50
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
14:51:20 Writing NN index file to temp file /var/folders/fb/63zhxstn6bvc52qb8hgjc1c40000gn/T//Rtmpm8BWxh/file2d674de7d7a2
14:51:20 Searching Annoy index using 1 thread, search_k = 3000
14:51:21 Annoy recall = 100%
14:51:21 Commencing smooth kNN distance calibration using 1 thread
14:51:22 Initializing from normalized Laplacian + noise
14:51:22 Commencing optimization for 500 epochs, with 229372 positive edges
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
14:51:29 Optimization finished
When we run the analysis with Seurat, it includes the information of each cells in meta.data. We could check several informations, including which cells are annotated as which cluster or how many genes are detected in each cells.
Here, before moving on, we will check our meta.data.
Okay, now we have the clusters on the UMAP. However, we need to annotate which cluster is composed of which one. Seurat provides several different functions to get the idea, including visualisation of the gene expression.
Seurat can help you find markers that define clusters via differential expression. By default, it identifies positive and negative markers of a single cluster, compared to all other cells.
seuset.markers <- FindAllMarkers(seuset, only.pos = TRUE, min.pct = 0.25, logfc.threshold = 0.25)
Calculating cluster 0
| | 0 % ~calculating
|+ | 1 % ~21s
|++ | 2 % ~32s
|++ | 3 % ~28s
|+++ | 4 % ~25s
|+++ | 5 % ~24s
|++++ | 6 % ~24s
|++++ | 7 % ~23s
|+++++ | 9 % ~24s
|+++++ | 10% ~24s
|++++++ | 11% ~23s
|++++++ | 12% ~23s
|+++++++ | 13% ~23s
|+++++++ | 14% ~22s
|++++++++ | 15% ~22s
|++++++++ | 16% ~21s
|+++++++++ | 17% ~21s
|++++++++++ | 18% ~20s
|++++++++++ | 19% ~20s
|+++++++++++ | 20% ~19s
|+++++++++++ | 21% ~19s
|++++++++++++ | 22% ~19s
|++++++++++++ | 23% ~19s
|+++++++++++++ | 24% ~18s
|+++++++++++++ | 26% ~18s
|++++++++++++++ | 27% ~18s
|++++++++++++++ | 28% ~18s
|+++++++++++++++ | 29% ~17s
|+++++++++++++++ | 30% ~17s
|++++++++++++++++ | 31% ~17s
|++++++++++++++++ | 32% ~16s
|+++++++++++++++++ | 33% ~16s
|++++++++++++++++++ | 34% ~16s
|++++++++++++++++++ | 35% ~15s
|+++++++++++++++++++ | 36% ~15s
|+++++++++++++++++++ | 37% ~15s
|++++++++++++++++++++ | 38% ~14s
|++++++++++++++++++++ | 39% ~14s
|+++++++++++++++++++++ | 40% ~14s
|+++++++++++++++++++++ | 41% ~14s
|++++++++++++++++++++++ | 43% ~13s
|++++++++++++++++++++++ | 44% ~13s
|+++++++++++++++++++++++ | 45% ~13s
|+++++++++++++++++++++++ | 46% ~12s
|++++++++++++++++++++++++ | 47% ~12s
|++++++++++++++++++++++++ | 48% ~12s
|+++++++++++++++++++++++++ | 49% ~12s
|+++++++++++++++++++++++++ | 50% ~11s
|++++++++++++++++++++++++++ | 51% ~11s
|+++++++++++++++++++++++++++ | 52% ~11s
|+++++++++++++++++++++++++++ | 53% ~11s
|++++++++++++++++++++++++++++ | 54% ~10s
|++++++++++++++++++++++++++++ | 55% ~10s
|+++++++++++++++++++++++++++++ | 56% ~10s
|+++++++++++++++++++++++++++++ | 57% ~10s
|++++++++++++++++++++++++++++++ | 59% ~09s
|++++++++++++++++++++++++++++++ | 60% ~09s
|+++++++++++++++++++++++++++++++ | 61% ~09s
|+++++++++++++++++++++++++++++++ | 62% ~09s
|++++++++++++++++++++++++++++++++ | 63% ~08s
|++++++++++++++++++++++++++++++++ | 64% ~08s
|+++++++++++++++++++++++++++++++++ | 65% ~08s
|+++++++++++++++++++++++++++++++++ | 66% ~08s
|++++++++++++++++++++++++++++++++++ | 67% ~07s
|+++++++++++++++++++++++++++++++++++ | 68% ~07s
|+++++++++++++++++++++++++++++++++++ | 69% ~07s
|++++++++++++++++++++++++++++++++++++ | 70% ~07s
|++++++++++++++++++++++++++++++++++++ | 71% ~06s
|+++++++++++++++++++++++++++++++++++++ | 72% ~06s
|+++++++++++++++++++++++++++++++++++++ | 73% ~06s
|++++++++++++++++++++++++++++++++++++++ | 74% ~06s
|++++++++++++++++++++++++++++++++++++++ | 76% ~05s
|+++++++++++++++++++++++++++++++++++++++ | 77% ~05s
|+++++++++++++++++++++++++++++++++++++++ | 78% ~05s
|++++++++++++++++++++++++++++++++++++++++ | 79% ~05s
|++++++++++++++++++++++++++++++++++++++++ | 80% ~05s
|+++++++++++++++++++++++++++++++++++++++++ | 81% ~04s
|+++++++++++++++++++++++++++++++++++++++++ | 82% ~04s
|++++++++++++++++++++++++++++++++++++++++++ | 83% ~04s
|+++++++++++++++++++++++++++++++++++++++++++ | 84% ~04s
|+++++++++++++++++++++++++++++++++++++++++++ | 85% ~03s
|++++++++++++++++++++++++++++++++++++++++++++ | 86% ~03s
|++++++++++++++++++++++++++++++++++++++++++++ | 87% ~03s
|+++++++++++++++++++++++++++++++++++++++++++++ | 88% ~03s
|+++++++++++++++++++++++++++++++++++++++++++++ | 89% ~02s
|++++++++++++++++++++++++++++++++++++++++++++++ | 90% ~02s
|++++++++++++++++++++++++++++++++++++++++++++++ | 91% ~02s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 93% ~02s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 94% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 95% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 96% ~01s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 97% ~01s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 98% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 99% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=22s
Calculating cluster 1
| | 0 % ~calculating
|+ | 1 % ~21s
|++ | 2 % ~22s
|++ | 3 % ~25s
|+++ | 4 % ~24s
|+++ | 5 % ~23s
|++++ | 6 % ~22s
|++++ | 7 % ~22s
|+++++ | 8 % ~21s
|+++++ | 9 % ~21s
|++++++ | 10% ~21s
|++++++ | 11% ~21s
|+++++++ | 12% ~21s
|+++++++ | 13% ~20s
|++++++++ | 14% ~20s
|++++++++ | 15% ~20s
|+++++++++ | 16% ~19s
|+++++++++ | 17% ~20s
|++++++++++ | 18% ~20s
|++++++++++ | 19% ~19s
|+++++++++++ | 20% ~19s
|+++++++++++ | 21% ~19s
|++++++++++++ | 22% ~19s
|++++++++++++ | 23% ~18s
|+++++++++++++ | 24% ~18s
|+++++++++++++ | 26% ~18s
|++++++++++++++ | 27% ~18s
|++++++++++++++ | 28% ~18s
|+++++++++++++++ | 29% ~18s
|+++++++++++++++ | 30% ~17s
|++++++++++++++++ | 31% ~17s
|++++++++++++++++ | 32% ~17s
|+++++++++++++++++ | 33% ~17s
|+++++++++++++++++ | 34% ~16s
|++++++++++++++++++ | 35% ~16s
|++++++++++++++++++ | 36% ~16s
|+++++++++++++++++++ | 37% ~16s
|+++++++++++++++++++ | 38% ~15s
|++++++++++++++++++++ | 39% ~15s
|++++++++++++++++++++ | 40% ~15s
|+++++++++++++++++++++ | 41% ~14s
|+++++++++++++++++++++ | 42% ~14s
|++++++++++++++++++++++ | 43% ~14s
|++++++++++++++++++++++ | 44% ~13s
|+++++++++++++++++++++++ | 45% ~13s
|+++++++++++++++++++++++ | 46% ~13s
|++++++++++++++++++++++++ | 47% ~13s
|++++++++++++++++++++++++ | 48% ~12s
|+++++++++++++++++++++++++ | 49% ~12s
|+++++++++++++++++++++++++ | 50% ~12s
|++++++++++++++++++++++++++ | 51% ~12s
|+++++++++++++++++++++++++++ | 52% ~11s
|+++++++++++++++++++++++++++ | 53% ~11s
|++++++++++++++++++++++++++++ | 54% ~11s
|++++++++++++++++++++++++++++ | 55% ~11s
|+++++++++++++++++++++++++++++ | 56% ~10s
|+++++++++++++++++++++++++++++ | 57% ~10s
|++++++++++++++++++++++++++++++ | 58% ~10s
|++++++++++++++++++++++++++++++ | 59% ~09s
|+++++++++++++++++++++++++++++++ | 60% ~09s
|+++++++++++++++++++++++++++++++ | 61% ~09s
|++++++++++++++++++++++++++++++++ | 62% ~09s
|++++++++++++++++++++++++++++++++ | 63% ~08s
|+++++++++++++++++++++++++++++++++ | 64% ~08s
|+++++++++++++++++++++++++++++++++ | 65% ~08s
|++++++++++++++++++++++++++++++++++ | 66% ~08s
|++++++++++++++++++++++++++++++++++ | 67% ~07s
|+++++++++++++++++++++++++++++++++++ | 68% ~07s
|+++++++++++++++++++++++++++++++++++ | 69% ~07s
|++++++++++++++++++++++++++++++++++++ | 70% ~07s
|++++++++++++++++++++++++++++++++++++ | 71% ~06s
|+++++++++++++++++++++++++++++++++++++ | 72% ~06s
|+++++++++++++++++++++++++++++++++++++ | 73% ~06s
|++++++++++++++++++++++++++++++++++++++ | 74% ~06s
|++++++++++++++++++++++++++++++++++++++ | 76% ~06s
|+++++++++++++++++++++++++++++++++++++++ | 77% ~05s
|+++++++++++++++++++++++++++++++++++++++ | 78% ~05s
|++++++++++++++++++++++++++++++++++++++++ | 79% ~05s
|++++++++++++++++++++++++++++++++++++++++ | 80% ~05s
|+++++++++++++++++++++++++++++++++++++++++ | 81% ~04s
|+++++++++++++++++++++++++++++++++++++++++ | 82% ~04s
|++++++++++++++++++++++++++++++++++++++++++ | 83% ~04s
|++++++++++++++++++++++++++++++++++++++++++ | 84% ~04s
|+++++++++++++++++++++++++++++++++++++++++++ | 85% ~03s
|+++++++++++++++++++++++++++++++++++++++++++ | 86% ~03s
|++++++++++++++++++++++++++++++++++++++++++++ | 87% ~03s
|++++++++++++++++++++++++++++++++++++++++++++ | 88% ~03s
|+++++++++++++++++++++++++++++++++++++++++++++ | 89% ~03s
|+++++++++++++++++++++++++++++++++++++++++++++ | 90% ~02s
|++++++++++++++++++++++++++++++++++++++++++++++ | 91% ~02s
|++++++++++++++++++++++++++++++++++++++++++++++ | 92% ~02s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 93% ~02s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 94% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 95% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 96% ~01s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 97% ~01s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 98% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 99% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=23s
Calculating cluster 2
| | 0 % ~calculating
|+ | 1 % ~09s
|++ | 2 % ~09s
|++ | 3 % ~08s
|+++ | 4 % ~08s
|+++ | 5 % ~08s
|++++ | 7 % ~08s
|++++ | 8 % ~08s
|+++++ | 9 % ~08s
|+++++ | 10% ~09s
|++++++ | 11% ~08s
|+++++++ | 12% ~08s
|+++++++ | 13% ~08s
|++++++++ | 14% ~08s
|++++++++ | 15% ~08s
|+++++++++ | 16% ~07s
|+++++++++ | 18% ~07s
|++++++++++ | 19% ~07s
|++++++++++ | 20% ~07s
|+++++++++++ | 21% ~07s
|+++++++++++ | 22% ~07s
|++++++++++++ | 23% ~07s
|+++++++++++++ | 24% ~07s
|+++++++++++++ | 25% ~07s
|++++++++++++++ | 26% ~07s
|++++++++++++++ | 27% ~06s
|+++++++++++++++ | 29% ~06s
|+++++++++++++++ | 30% ~06s
|++++++++++++++++ | 31% ~06s
|++++++++++++++++ | 32% ~06s
|+++++++++++++++++ | 33% ~06s
|++++++++++++++++++ | 34% ~06s
|++++++++++++++++++ | 35% ~06s
|+++++++++++++++++++ | 36% ~06s
|+++++++++++++++++++ | 37% ~06s
|++++++++++++++++++++ | 38% ~05s
|++++++++++++++++++++ | 40% ~05s
|+++++++++++++++++++++ | 41% ~05s
|+++++++++++++++++++++ | 42% ~05s
|++++++++++++++++++++++ | 43% ~05s
|++++++++++++++++++++++ | 44% ~05s
|+++++++++++++++++++++++ | 45% ~05s
|++++++++++++++++++++++++ | 46% ~05s
|++++++++++++++++++++++++ | 47% ~05s
|+++++++++++++++++++++++++ | 48% ~05s
|+++++++++++++++++++++++++ | 49% ~04s
|++++++++++++++++++++++++++ | 51% ~04s
|++++++++++++++++++++++++++ | 52% ~04s
|+++++++++++++++++++++++++++ | 53% ~04s
|+++++++++++++++++++++++++++ | 54% ~04s
|++++++++++++++++++++++++++++ | 55% ~04s
|+++++++++++++++++++++++++++++ | 56% ~04s
|+++++++++++++++++++++++++++++ | 57% ~04s
|++++++++++++++++++++++++++++++ | 58% ~04s
|++++++++++++++++++++++++++++++ | 59% ~04s
|+++++++++++++++++++++++++++++++ | 60% ~03s
|+++++++++++++++++++++++++++++++ | 62% ~03s
|++++++++++++++++++++++++++++++++ | 63% ~03s
|++++++++++++++++++++++++++++++++ | 64% ~03s
|+++++++++++++++++++++++++++++++++ | 65% ~03s
|+++++++++++++++++++++++++++++++++ | 66% ~03s
|++++++++++++++++++++++++++++++++++ | 67% ~03s
|+++++++++++++++++++++++++++++++++++ | 68% ~03s
|+++++++++++++++++++++++++++++++++++ | 69% ~03s
|++++++++++++++++++++++++++++++++++++ | 70% ~03s
|++++++++++++++++++++++++++++++++++++ | 71% ~02s
|+++++++++++++++++++++++++++++++++++++ | 73% ~02s
|+++++++++++++++++++++++++++++++++++++ | 74% ~02s
|++++++++++++++++++++++++++++++++++++++ | 75% ~02s
|++++++++++++++++++++++++++++++++++++++ | 76% ~02s
|+++++++++++++++++++++++++++++++++++++++ | 77% ~02s
|++++++++++++++++++++++++++++++++++++++++ | 78% ~02s
|++++++++++++++++++++++++++++++++++++++++ | 79% ~02s
|+++++++++++++++++++++++++++++++++++++++++ | 80% ~02s
|+++++++++++++++++++++++++++++++++++++++++ | 81% ~02s
|++++++++++++++++++++++++++++++++++++++++++ | 82% ~02s
|++++++++++++++++++++++++++++++++++++++++++ | 84% ~01s
|+++++++++++++++++++++++++++++++++++++++++++ | 85% ~01s
|+++++++++++++++++++++++++++++++++++++++++++ | 86% ~01s
|++++++++++++++++++++++++++++++++++++++++++++ | 87% ~01s
|++++++++++++++++++++++++++++++++++++++++++++ | 88% ~01s
|+++++++++++++++++++++++++++++++++++++++++++++ | 89% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++ | 90% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++ | 91% ~01s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 92% ~01s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 93% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 95% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 96% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 97% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 98% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 99% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=09s
Calculating cluster 3
| | 0 % ~calculating
|+ | 1 % ~27s
|++ | 2 % ~28s
|++ | 3 % ~30s
|+++ | 4 % ~29s
|+++ | 5 % ~28s
|++++ | 6 % ~28s
|++++ | 7 % ~27s
|+++++ | 8 % ~27s
|+++++ | 9 % ~26s
|++++++ | 10% ~26s
|++++++ | 11% ~26s
|+++++++ | 12% ~26s
|+++++++ | 14% ~27s
|++++++++ | 15% ~26s
|++++++++ | 16% ~26s
|+++++++++ | 17% ~25s
|+++++++++ | 18% ~25s
|++++++++++ | 19% ~24s
|++++++++++ | 20% ~24s
|+++++++++++ | 21% ~24s
|+++++++++++ | 22% ~24s
|++++++++++++ | 23% ~23s
|++++++++++++ | 24% ~23s
|+++++++++++++ | 25% ~23s
|++++++++++++++ | 26% ~22s
|++++++++++++++ | 27% ~22s
|+++++++++++++++ | 28% ~22s
|+++++++++++++++ | 29% ~21s
|++++++++++++++++ | 30% ~21s
|++++++++++++++++ | 31% ~21s
|+++++++++++++++++ | 32% ~21s
|+++++++++++++++++ | 33% ~20s
|++++++++++++++++++ | 34% ~20s
|++++++++++++++++++ | 35% ~20s
|+++++++++++++++++++ | 36% ~19s
|+++++++++++++++++++ | 38% ~19s
|++++++++++++++++++++ | 39% ~19s
|++++++++++++++++++++ | 40% ~19s
|+++++++++++++++++++++ | 41% ~18s
|+++++++++++++++++++++ | 42% ~18s
|++++++++++++++++++++++ | 43% ~18s
|++++++++++++++++++++++ | 44% ~17s
|+++++++++++++++++++++++ | 45% ~17s
|+++++++++++++++++++++++ | 46% ~17s
|++++++++++++++++++++++++ | 47% ~16s
|++++++++++++++++++++++++ | 48% ~16s
|+++++++++++++++++++++++++ | 49% ~16s
|+++++++++++++++++++++++++ | 50% ~15s
|++++++++++++++++++++++++++ | 51% ~15s
|+++++++++++++++++++++++++++ | 52% ~15s
|+++++++++++++++++++++++++++ | 53% ~15s
|++++++++++++++++++++++++++++ | 54% ~14s
The min.pct argument requires a feature to be detected at a minimum percentage in either of the two groups of cells, and the thresh.test argument requires a feature to be differentially expressed (on average) by some amount between the two groups.
Here, since our purpose for getting maker genes is to define the cluster and decide which one would be the contamination, so we will take only top 50 marker of individual clusters.
top50 <- seuset.markers %>% group_by(cluster) %>% top_n(n = 50, wt = avg_log2FC)
head(top50)
For check-up, we could export it as .csv file format.
write.table(top50, "Top50_Markers_cluster.csv", quote=F, sep=",", row.names=F, col.names=T)
Not only with the FindAllMarkers function, Seurat provides several tools for visualizing marker expression. The first one is called violin plot.
For VlnPlot(), we could put several genes by using combination, c().
What if we would like to see the gene expression on the UMAP directly, rather than checking the violin plot? FeaturePlot() will help you! It is exactly same as VlnPlot().
Putting three or four genes in the function using c() would not be something bothered. However, what if we have like 20 genes to check? In this case, we could declare the list of genes we would like to see, then make the plotting as loop!
gene_list <- c("Pdgfra", "Vim", "Zeb2", "Itgb1", "Itga6", "Epcam", "Prom1", "Ly6a", "Foxa1", "Prlr", "Myb", "Cited1", "Pgr", "Tspan1", "Esr1", "Elf5", "Kit", "Krt8", "Krt18", "Krt19", "Krt7", "Cldn4", "Cdh1")
feature <- function(x) {
FeaturePlot(seuset,features =x)
}
dir.create("Feature")
pathdir <- file.path("Feature")
for (i in 1:length(gene_list)){
feature(gene_list[i])
ggsave(path = pathdir, paste(gene_list[i],"_FeaturePlot.pdf",sep=""), width = 20, height = 20, units = "cm")
}
violin <- function(x) {
VlnPlot(seuset, features = x)
}
dir.create("Violin")
pathdir <- file.path("Violin")
for (i in 1:length(gene_list)){
violin(gene_list[i])
ggsave(path = pathdir, paste(gene_list[i],"_ViolinPlot.pdf",sep=""), width = 20, height = 20, units = "cm")
}
Based on the marker genes, we could clarify which clusters are the one we need to keep for the further analysis. If yes, what we should do is taking the clusters which we would like to keep from the Seurat object which we used for the clustering.
In this example, among the initial clusters, what we need are 1, 3 and 8. Therefore, we will only take those three clusters and re-cluster it.
names(seuset@meta.data)
[1] "orig.ident" "nCount_RNA" "nFeature_RNA" "percent.mt" "RNA_snn_res.0.3" "seurat_clusters"
On the meta.data of our seurat object, the cluster information is included in RNA_snn_res.0.3.
Since we take the clusters which we need, what we need to do is re-calculate the clusters and plot it on UMAP. This step is required because when we subcluster the certain clusters from the whole data, the neighbour and variability information is changed so the definition of clusters will be changed.
The first step is identification of feature genes on the selected clusters with FindVariableFeatures() function. This will find out the variability between genes and find outliers.
filt.seuset <- FindVariableFeatures(filt.seuset, selection.method = "vst", nfeatures = 1000)
Calculating gene variances
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Calculating feature variances of standardized and clipped values
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Then we will scale and calculate PCs. Scale is same concept as normalization, but in Seurat, the variable features which we calculated on the previous step are used.
all.genes <- rownames(filt.seuset)
filt.seuset <- ScaleData(filt.seuset, features = all.genes)
Centering and scaling data matrix
|
| | 0%
|
|===== | 5%
|
|========== | 10%
|
|============== | 14%
|
|=================== | 19%
|
|======================== | 24%
|
|============================= | 29%
|
|================================== | 33%
|
|====================================== | 38%
|
|=========================================== | 43%
|
|================================================ | 48%
|
|===================================================== | 52%
|
|========================================================== | 57%
|
|=============================================================== | 62%
|
|=================================================================== | 67%
|
|======================================================================== | 71%
|
|============================================================================= | 76%
|
|================================================================================== | 81%
|
|======================================================================================= | 86%
|
|=========================================================================================== | 90%
|
|================================================================================================ | 95%
|
|=====================================================================================================| 100%
filt.seuset <- RunPCA(filt.seuset, features = VariableFeatures(object = filt.seuset))
PC_ 1
Positive: Ptn, Phyh, Prlr, Cited1, Gipc2, Cd164, Gpx3, Tspan1, Slc12a2, Cldn10
Dnajc12, Cd200, AW112010, Wfdc2, Cxcl15, Itih5, Tmem56, Tmem158, Col8a1, Slc7a2
Areg, Stc2, Aqp5, Ifitm3, Hmgcs2, Fgfr2, Tspan13, Cdo1, Calca, Samd5
Negative: Trf, Dbi, Mfge8, Wfdc18, Mgst1, Muc15, Lcn2, Plet1, Rbp1, Csn3
Phlda1, Plb1, Elf5, Csn1s1, Muc4, Csn2, Atp2b1, Cebpb, Plin2, Kcnn4
Dmkn, Ptges, Cd14, C3, Bcl2l15, Crabp2, Csn1s2a, Ceacam1, Slc28a3, Cdc42ep3
PC_ 2
Positive: Sparc, Aebp1, Postn, Cxcl14, Cald1, Tpm2, Col4a2, Col4a1, Mmp2, Acta2
Palld, Rnase4, Bgn, Mylk, Tgfbr3, Krt5, Tagln, Thbs1, Krt14, Gja1
Myh11, Scn7a, Adamts1, Fst, Krt17, Fstl1, Apoe, Igfbp7, Vim, Cxcl12
Negative: Clu, Cldn4, Prlr, Aqp5, Cd164, Basp1, Wnt4, Tspan1, Dnajc12, AW112010
Wfdc2, Gipc2, Phyh, Cited1, Tspan13, Cxcl15, Bik, Cldn10, Slc12a2, Anxa1
Cd14, Glul, Cdo1, Clta, Hist1h2bc, Prss22, Tmem56, Tmed3, Col8a1, Areg
PC_ 3
Positive: Acta2, Tpm2, Tagln, Krt5, Myh11, Mylk, Krt14, Krt17, Ecrg4, Cnn1
Myl9, Fst, Cxcl14, Il17b, Apoe, Col17a1, Tshz2, Mia, Palld, Tenm2
Id4, Lmo1, Has2, Phlda3, Cotl1, Lhfp, Nrg1, Lama3, Wif1, Pltp
Negative: Mfap5, Lama2, Ccdc80, Lum, Dpep1, Rarres2, Abca8a, Tnfaip6, Col3a1, Sparcl1
Col1a1, Col1a2, Serpinf1, Htra3, Loxl1, Hsd11b1, Igfbp6, Col15a1, Cpxm1, Tnxb
Pla1a, Efemp1, Col6a1, Lpl, Lox, Col6a2, Col5a3, Ctsk, Srpx, Ifi205
PC_ 4
Positive: Ctsl, Mt1, Mt2, Crispld2, Chil1, Igfbp5, Tgfbr3, Ecrg4, Lcn2, Fkbp11
Gm47533, Cebpd, Upk3a, Lbp, Cxcl12, Mgp, Myh11, Fmod, Pdlim3, Fabp5
Dcn, Ackr3, Emid1, Mia, Mylk, Csn1s2a, Sgk1, Pir, Htra1, Krt14
Negative: Srgn, Ptprc, Cd52, Ms4a4b, Cd53, Rac2, Coro1a, Laptm5, Cd3g, Neurl3
Fxyd5, Gimap6, Cd2, Il2rg, Txk, Satb1, Gpr183, P2ry10, Ccr7, Gimap3
Cd3d, Stk17b, Cd28, Ms4a6b, Icos, Il7r, Hcst, Trac, Trbc2, Itk
PC_ 5
Positive: Csn1s2a, Lalba, Csn2, Folr1, Spp1, Csn1s1, Lipa, Plin2, BC018473, Cited2
Lrg1, Thrsp, Csn3, Fabp3, Glycam1, Ctsl, Ldha, Dab2, Igfbp5, Abhd5
Emid1, Fth1, Mt1, Gm1673, Scd1, Chpt1, Lbp, Ceacam10, Fkbp11, Lao1
Negative: Sncg, Fcgbp, Lgals3, Aldh1a3, Cryab, Tnfaip2, Crip1, Emp1, Gas6, Ltf
Alox12e, Ccnd1, Baiap2, Sfn, Barx2, Rspo1, Jdp2, Bbox1, Pkp1, Atp2b1
Alox15, Kit, Cnmd, S100a6, Pdlim1, Tm4sf1, S100a14, Cytip, Rnase1, Lypd3
Still, we could use 30 PCs on the subclusters. The further steps are exactly same as the one we did on the pre-proceeded datasets.
filt.seuset <- FindNeighbors(filt.seuset, dims = 1:30, k.param = 5)
Computing nearest neighbor graph
Computing SNN
filt.seuset <- FindClusters(filt.seuset, resolution = 0.3)
Modularity Optimizer version 1.3.0 by Ludo Waltman and Nees Jan van Eck
Number of nodes: 1473
Number of edges: 17014
Running Louvain algorithm...
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Maximum modularity in 10 random starts: 0.9158
Number of communities: 10
Elapsed time: 0 seconds
filt.seuset <- RunUMAP(filt.seuset, dims = 1:30)
15:18:48 UMAP embedding parameters a = 0.9922 b = 1.112
15:18:48 Read 1473 rows and found 30 numeric columns
15:18:48 Using Annoy for neighbor search, n_neighbors = 30
15:18:48 Building Annoy index with metric = cosine, n_trees = 50
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
15:18:48 Writing NN index file to temp file /var/folders/fb/63zhxstn6bvc52qb8hgjc1c40000gn/T//Rtmpm8BWxh/file2d6779c94d2b
15:18:48 Searching Annoy index using 1 thread, search_k = 3000
15:18:49 Annoy recall = 100%
15:18:49 Commencing smooth kNN distance calibration using 1 thread
15:18:50 Initializing from normalized Laplacian + noise
15:18:50 Commencing optimization for 500 epochs, with 60890 positive edges
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
15:18:52 Optimization finished
DimPlot(filt.seuset, reduction = "umap",label = T,label.size = 4)
Okay, now we have the clusters with selected ones on the UMAP. Still, we need to annotate which cluster is composed of which one.
Seurat can help you find markers that define clusters via differential expression. By default, it identifies positive and negative markers of a single cluster, compared to all other cells.
seuset.filt.markers <- FindAllMarkers(filt.seuset, only.pos = TRUE, min.pct = 0.25, logfc.threshold = 0.25)
Calculating cluster 0
| | 0 % ~calculating
|+ | 1 % ~03s
|++ | 2 % ~02s
|++ | 3 % ~02s
|+++ | 4 % ~03s
|+++ | 5 % ~03s
|++++ | 6 % ~03s
|++++ | 7 % ~03s
|+++++ | 8 % ~03s
|+++++ | 9 % ~03s
|++++++ | 10% ~03s
|++++++ | 11% ~03s
|+++++++ | 12% ~03s
|+++++++ | 14% ~03s
|++++++++ | 15% ~03s
|++++++++ | 16% ~03s
|+++++++++ | 17% ~03s
|+++++++++ | 18% ~03s
|++++++++++ | 19% ~03s
|++++++++++ | 20% ~03s
|+++++++++++ | 21% ~03s
|+++++++++++ | 22% ~03s
|++++++++++++ | 23% ~03s
|++++++++++++ | 24% ~03s
|+++++++++++++ | 25% ~03s
|++++++++++++++ | 26% ~03s
|++++++++++++++ | 27% ~03s
|+++++++++++++++ | 28% ~02s
|+++++++++++++++ | 29% ~02s
|++++++++++++++++ | 30% ~02s
|++++++++++++++++ | 31% ~02s
|+++++++++++++++++ | 32% ~02s
|+++++++++++++++++ | 33% ~02s
|++++++++++++++++++ | 34% ~02s
|++++++++++++++++++ | 35% ~02s
|+++++++++++++++++++ | 36% ~02s
|+++++++++++++++++++ | 38% ~02s
|++++++++++++++++++++ | 39% ~02s
|++++++++++++++++++++ | 40% ~02s
|+++++++++++++++++++++ | 41% ~02s
|+++++++++++++++++++++ | 42% ~02s
|++++++++++++++++++++++ | 43% ~02s
|++++++++++++++++++++++ | 44% ~02s
|+++++++++++++++++++++++ | 45% ~02s
|+++++++++++++++++++++++ | 46% ~02s
|++++++++++++++++++++++++ | 47% ~02s
|++++++++++++++++++++++++ | 48% ~02s
|+++++++++++++++++++++++++ | 49% ~02s
|+++++++++++++++++++++++++ | 50% ~02s
|++++++++++++++++++++++++++ | 51% ~02s
|+++++++++++++++++++++++++++ | 52% ~02s
|+++++++++++++++++++++++++++ | 53% ~02s
|++++++++++++++++++++++++++++ | 54% ~02s
|++++++++++++++++++++++++++++ | 55% ~02s
|+++++++++++++++++++++++++++++ | 56% ~02s
|+++++++++++++++++++++++++++++ | 57% ~02s
|++++++++++++++++++++++++++++++ | 58% ~01s
|++++++++++++++++++++++++++++++ | 59% ~01s
|+++++++++++++++++++++++++++++++ | 60% ~01s
|+++++++++++++++++++++++++++++++ | 61% ~01s
|++++++++++++++++++++++++++++++++ | 62% ~01s
|++++++++++++++++++++++++++++++++ | 64% ~01s
|+++++++++++++++++++++++++++++++++ | 65% ~01s
|+++++++++++++++++++++++++++++++++ | 66% ~01s
|++++++++++++++++++++++++++++++++++ | 67% ~01s
|++++++++++++++++++++++++++++++++++ | 68% ~01s
|+++++++++++++++++++++++++++++++++++ | 69% ~01s
|+++++++++++++++++++++++++++++++++++ | 70% ~01s
|++++++++++++++++++++++++++++++++++++ | 71% ~01s
|++++++++++++++++++++++++++++++++++++ | 72% ~01s
|+++++++++++++++++++++++++++++++++++++ | 73% ~01s
|+++++++++++++++++++++++++++++++++++++ | 74% ~01s
|++++++++++++++++++++++++++++++++++++++ | 75% ~01s
|+++++++++++++++++++++++++++++++++++++++ | 76% ~01s
|+++++++++++++++++++++++++++++++++++++++ | 77% ~01s
|++++++++++++++++++++++++++++++++++++++++ | 78% ~01s
|++++++++++++++++++++++++++++++++++++++++ | 79% ~01s
|+++++++++++++++++++++++++++++++++++++++++ | 80% ~01s
|+++++++++++++++++++++++++++++++++++++++++ | 81% ~01s
|++++++++++++++++++++++++++++++++++++++++++ | 82% ~01s
|++++++++++++++++++++++++++++++++++++++++++ | 83% ~01s
|+++++++++++++++++++++++++++++++++++++++++++ | 84% ~01s
|+++++++++++++++++++++++++++++++++++++++++++ | 85% ~01s
|++++++++++++++++++++++++++++++++++++++++++++ | 86% ~00s
|++++++++++++++++++++++++++++++++++++++++++++ | 88% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++ | 89% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++ | 90% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++ | 91% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++ | 92% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 93% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 94% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 95% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 96% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 97% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 98% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 99% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=04s
Calculating cluster 1
| | 0 % ~calculating
|+ | 1 % ~04s
|++ | 2 % ~04s
|++ | 3 % ~04s
|+++ | 4 % ~04s
|+++ | 5 % ~04s
|++++ | 6 % ~04s
|++++ | 8 % ~04s
|+++++ | 9 % ~04s
|+++++ | 10% ~04s
|++++++ | 11% ~04s
|++++++ | 12% ~04s
|+++++++ | 13% ~04s
|+++++++ | 14% ~04s
|++++++++ | 15% ~04s
|+++++++++ | 16% ~04s
|+++++++++ | 17% ~04s
|++++++++++ | 18% ~04s
|++++++++++ | 19% ~03s
|+++++++++++ | 20% ~03s
|+++++++++++ | 22% ~03s
|++++++++++++ | 23% ~03s
|++++++++++++ | 24% ~03s
|+++++++++++++ | 25% ~03s
|+++++++++++++ | 26% ~03s
|++++++++++++++ | 27% ~03s
|++++++++++++++ | 28% ~03s
|+++++++++++++++ | 29% ~03s
|++++++++++++++++ | 30% ~03s
|++++++++++++++++ | 31% ~03s
|+++++++++++++++++ | 32% ~03s
|+++++++++++++++++ | 33% ~03s
|++++++++++++++++++ | 34% ~03s
|++++++++++++++++++ | 35% ~03s
|+++++++++++++++++++ | 37% ~03s
|+++++++++++++++++++ | 38% ~03s
|++++++++++++++++++++ | 39% ~03s
|++++++++++++++++++++ | 40% ~03s
|+++++++++++++++++++++ | 41% ~03s
|+++++++++++++++++++++ | 42% ~03s
|++++++++++++++++++++++ | 43% ~03s
|+++++++++++++++++++++++ | 44% ~02s
|+++++++++++++++++++++++ | 45% ~02s
|++++++++++++++++++++++++ | 46% ~02s
|++++++++++++++++++++++++ | 47% ~02s
|+++++++++++++++++++++++++ | 48% ~02s
|+++++++++++++++++++++++++ | 49% ~02s
|++++++++++++++++++++++++++ | 51% ~02s
|++++++++++++++++++++++++++ | 52% ~02s
|+++++++++++++++++++++++++++ | 53% ~02s
|+++++++++++++++++++++++++++ | 54% ~02s
|++++++++++++++++++++++++++++ | 55% ~02s
|++++++++++++++++++++++++++++ | 56% ~02s
|+++++++++++++++++++++++++++++ | 57% ~02s
|++++++++++++++++++++++++++++++ | 58% ~02s
|++++++++++++++++++++++++++++++ | 59% ~02s
|+++++++++++++++++++++++++++++++ | 60% ~02s
|+++++++++++++++++++++++++++++++ | 61% ~02s
|++++++++++++++++++++++++++++++++ | 62% ~02s
|++++++++++++++++++++++++++++++++ | 63% ~02s
|+++++++++++++++++++++++++++++++++ | 65% ~02s
|+++++++++++++++++++++++++++++++++ | 66% ~02s
|++++++++++++++++++++++++++++++++++ | 67% ~02s
|++++++++++++++++++++++++++++++++++ | 68% ~01s
|+++++++++++++++++++++++++++++++++++ | 69% ~01s
|+++++++++++++++++++++++++++++++++++ | 70% ~01s
|++++++++++++++++++++++++++++++++++++ | 71% ~01s
|+++++++++++++++++++++++++++++++++++++ | 72% ~01s
|+++++++++++++++++++++++++++++++++++++ | 73% ~01s
|++++++++++++++++++++++++++++++++++++++ | 74% ~01s
|++++++++++++++++++++++++++++++++++++++ | 75% ~01s
|+++++++++++++++++++++++++++++++++++++++ | 76% ~01s
|+++++++++++++++++++++++++++++++++++++++ | 77% ~01s
|++++++++++++++++++++++++++++++++++++++++ | 78% ~01s
|++++++++++++++++++++++++++++++++++++++++ | 80% ~01s
|+++++++++++++++++++++++++++++++++++++++++ | 81% ~01s
|+++++++++++++++++++++++++++++++++++++++++ | 82% ~01s
|++++++++++++++++++++++++++++++++++++++++++ | 83% ~01s
|++++++++++++++++++++++++++++++++++++++++++ | 84% ~01s
|+++++++++++++++++++++++++++++++++++++++++++ | 85% ~01s
|++++++++++++++++++++++++++++++++++++++++++++ | 86% ~01s
|++++++++++++++++++++++++++++++++++++++++++++ | 87% ~01s
|+++++++++++++++++++++++++++++++++++++++++++++ | 88% ~01s
|+++++++++++++++++++++++++++++++++++++++++++++ | 89% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++ | 90% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++ | 91% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 92% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 94% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 95% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 96% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 97% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 98% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 99% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=05s
Calculating cluster 2
| | 0 % ~calculating
|+ | 1 % ~04s
|++ | 2 % ~03s
|++ | 4 % ~04s
|+++ | 5 % ~04s
|+++ | 6 % ~04s
|++++ | 7 % ~04s
|+++++ | 8 % ~04s
|+++++ | 10% ~04s
|++++++ | 11% ~04s
|++++++ | 12% ~04s
|+++++++ | 13% ~04s
|++++++++ | 14% ~04s
|++++++++ | 15% ~04s
|+++++++++ | 17% ~03s
|+++++++++ | 18% ~03s
|++++++++++ | 19% ~03s
|+++++++++++ | 20% ~03s
|+++++++++++ | 21% ~03s
|++++++++++++ | 23% ~03s
|++++++++++++ | 24% ~03s
|+++++++++++++ | 25% ~03s
|++++++++++++++ | 26% ~03s
|++++++++++++++ | 27% ~03s
|+++++++++++++++ | 29% ~03s
|+++++++++++++++ | 30% ~03s
|++++++++++++++++ | 31% ~03s
|+++++++++++++++++ | 32% ~03s
|+++++++++++++++++ | 33% ~03s
|++++++++++++++++++ | 35% ~03s
|++++++++++++++++++ | 36% ~03s
|+++++++++++++++++++ | 37% ~03s
|++++++++++++++++++++ | 38% ~03s
|++++++++++++++++++++ | 39% ~03s
|+++++++++++++++++++++ | 40% ~03s
|+++++++++++++++++++++ | 42% ~03s
|++++++++++++++++++++++ | 43% ~02s
|+++++++++++++++++++++++ | 44% ~02s
|+++++++++++++++++++++++ | 45% ~02s
|++++++++++++++++++++++++ | 46% ~02s
|++++++++++++++++++++++++ | 48% ~02s
|+++++++++++++++++++++++++ | 49% ~02s
|+++++++++++++++++++++++++ | 50% ~02s
|++++++++++++++++++++++++++ | 51% ~02s
|+++++++++++++++++++++++++++ | 52% ~02s
|+++++++++++++++++++++++++++ | 54% ~02s
|++++++++++++++++++++++++++++ | 55% ~02s
|++++++++++++++++++++++++++++ | 56% ~02s
|+++++++++++++++++++++++++++++ | 57% ~02s
|++++++++++++++++++++++++++++++ | 58% ~02s
|++++++++++++++++++++++++++++++ | 60% ~02s
|+++++++++++++++++++++++++++++++ | 61% ~02s
|+++++++++++++++++++++++++++++++ | 62% ~02s
|++++++++++++++++++++++++++++++++ | 63% ~02s
|+++++++++++++++++++++++++++++++++ | 64% ~02s
|+++++++++++++++++++++++++++++++++ | 65% ~01s
|++++++++++++++++++++++++++++++++++ | 67% ~01s
|++++++++++++++++++++++++++++++++++ | 68% ~01s
|+++++++++++++++++++++++++++++++++++ | 69% ~01s
|++++++++++++++++++++++++++++++++++++ | 70% ~01s
|++++++++++++++++++++++++++++++++++++ | 71% ~01s
|+++++++++++++++++++++++++++++++++++++ | 73% ~01s
|+++++++++++++++++++++++++++++++++++++ | 74% ~01s
|++++++++++++++++++++++++++++++++++++++ | 75% ~01s
|+++++++++++++++++++++++++++++++++++++++ | 76% ~01s
|+++++++++++++++++++++++++++++++++++++++ | 77% ~01s
|++++++++++++++++++++++++++++++++++++++++ | 79% ~01s
|++++++++++++++++++++++++++++++++++++++++ | 80% ~01s
|+++++++++++++++++++++++++++++++++++++++++ | 81% ~01s
|++++++++++++++++++++++++++++++++++++++++++ | 82% ~01s
|++++++++++++++++++++++++++++++++++++++++++ | 83% ~01s
|+++++++++++++++++++++++++++++++++++++++++++ | 85% ~01s
|+++++++++++++++++++++++++++++++++++++++++++ | 86% ~01s
|++++++++++++++++++++++++++++++++++++++++++++ | 87% ~01s
|+++++++++++++++++++++++++++++++++++++++++++++ | 88% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++ | 89% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++ | 90% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++ | 92% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 93% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 94% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 95% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 96% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 98% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 99% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=04s
Calculating cluster 3
| | 0 % ~calculating
|+ | 1 % ~08s
|++ | 2 % ~09s
|++ | 3 % ~09s
|+++ | 4 % ~09s
|+++ | 5 % ~08s
|++++ | 6 % ~08s
|++++ | 8 % ~08s
|+++++ | 9 % ~08s
|+++++ | 10% ~08s
|++++++ | 11% ~08s
|++++++ | 12% ~08s
|+++++++ | 13% ~08s
|+++++++ | 14% ~08s
|++++++++ | 15% ~08s
|+++++++++ | 16% ~08s
|+++++++++ | 17% ~07s
|++++++++++ | 18% ~07s
|++++++++++ | 19% ~07s
|+++++++++++ | 20% ~07s
|+++++++++++ | 22% ~07s
|++++++++++++ | 23% ~07s
|++++++++++++ | 24% ~07s
|+++++++++++++ | 25% ~07s
|+++++++++++++ | 26% ~07s
|++++++++++++++ | 27% ~06s
|++++++++++++++ | 28% ~06s
|+++++++++++++++ | 29% ~06s
|++++++++++++++++ | 30% ~06s
|++++++++++++++++ | 31% ~06s
|+++++++++++++++++ | 32% ~06s
|+++++++++++++++++ | 33% ~06s
|++++++++++++++++++ | 34% ~06s
|++++++++++++++++++ | 35% ~05s
|+++++++++++++++++++ | 37% ~05s
|+++++++++++++++++++ | 38% ~05s
|++++++++++++++++++++ | 39% ~05s
|++++++++++++++++++++ | 40% ~05s
|+++++++++++++++++++++ | 41% ~05s
|+++++++++++++++++++++ | 42% ~05s
|++++++++++++++++++++++ | 43% ~05s
|+++++++++++++++++++++++ | 44% ~05s
|+++++++++++++++++++++++ | 45% ~04s
|++++++++++++++++++++++++ | 46% ~04s
|++++++++++++++++++++++++ | 47% ~04s
|+++++++++++++++++++++++++ | 48% ~04s
|+++++++++++++++++++++++++ | 49% ~04s
|++++++++++++++++++++++++++ | 51% ~04s
|++++++++++++++++++++++++++ | 52% ~04s
|+++++++++++++++++++++++++++ | 53% ~04s
|+++++++++++++++++++++++++++ | 54% ~04s
|++++++++++++++++++++++++++++ | 55% ~04s
|++++++++++++++++++++++++++++ | 56% ~03s
|+++++++++++++++++++++++++++++ | 57% ~03s
|++++++++++++++++++++++++++++++ | 58% ~03s
|++++++++++++++++++++++++++++++ | 59% ~03s
|+++++++++++++++++++++++++++++++ | 60% ~03s
|+++++++++++++++++++++++++++++++ | 61% ~03s
|++++++++++++++++++++++++++++++++ | 62% ~03s
|++++++++++++++++++++++++++++++++ | 63% ~03s
|+++++++++++++++++++++++++++++++++ | 65% ~03s
|+++++++++++++++++++++++++++++++++ | 66% ~03s
|++++++++++++++++++++++++++++++++++ | 67% ~03s
|++++++++++++++++++++++++++++++++++ | 68% ~02s
|+++++++++++++++++++++++++++++++++++ | 69% ~02s
|+++++++++++++++++++++++++++++++++++ | 70% ~02s
|++++++++++++++++++++++++++++++++++++ | 71% ~02s
|+++++++++++++++++++++++++++++++++++++ | 72% ~02s
|+++++++++++++++++++++++++++++++++++++ | 73% ~02s
|++++++++++++++++++++++++++++++++++++++ | 74% ~02s
|++++++++++++++++++++++++++++++++++++++ | 75% ~02s
|+++++++++++++++++++++++++++++++++++++++ | 76% ~02s
|+++++++++++++++++++++++++++++++++++++++ | 77% ~02s
|++++++++++++++++++++++++++++++++++++++++ | 78% ~02s
|++++++++++++++++++++++++++++++++++++++++ | 80% ~02s
|+++++++++++++++++++++++++++++++++++++++++ | 81% ~02s
|+++++++++++++++++++++++++++++++++++++++++ | 82% ~01s
|++++++++++++++++++++++++++++++++++++++++++ | 83% ~01s
|++++++++++++++++++++++++++++++++++++++++++ | 84% ~01s
|+++++++++++++++++++++++++++++++++++++++++++ | 85% ~01s
|++++++++++++++++++++++++++++++++++++++++++++ | 86% ~01s
|++++++++++++++++++++++++++++++++++++++++++++ | 87% ~01s
|+++++++++++++++++++++++++++++++++++++++++++++ | 88% ~01s
|+++++++++++++++++++++++++++++++++++++++++++++ | 89% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++ | 90% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++ | 91% ~01s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 92% ~01s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 94% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 95% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 96% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 97% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 98% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 99% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=08s
Calculating cluster 4
| | 0 % ~calculating
|+ | 1 % ~11s
|+ | 2 % ~10s
|++ | 3 % ~10s
|++ | 4 % ~10s
|+++ | 5 % ~11s
|+++ | 6 % ~11s
|++++ | 7 % ~11s
|++++ | 8 % ~10s
|+++++ | 9 % ~10s
|+++++ | 10% ~10s
|++++++ | 11% ~10s
|++++++ | 12% ~10s
|+++++++ | 13% ~10s
|+++++++ | 14% ~10s
|++++++++ | 15% ~09s
|++++++++ | 16% ~09s
|+++++++++ | 17% ~09s
|+++++++++ | 18% ~09s
|++++++++++ | 19% ~09s
|++++++++++ | 20% ~09s
|+++++++++++ | 21% ~09s
|+++++++++++ | 22% ~09s
|++++++++++++ | 23% ~09s
|++++++++++++ | 24% ~08s
|+++++++++++++ | 25% ~08s
|+++++++++++++ | 26% ~08s
|++++++++++++++ | 27% ~08s
|++++++++++++++ | 28% ~08s
|+++++++++++++++ | 29% ~08s
|+++++++++++++++ | 30% ~08s
|++++++++++++++++ | 31% ~08s
|++++++++++++++++ | 32% ~08s
|+++++++++++++++++ | 33% ~07s
|+++++++++++++++++ | 34% ~07s
|++++++++++++++++++ | 35% ~07s
|++++++++++++++++++ | 36% ~07s
|+++++++++++++++++++ | 37% ~07s
|+++++++++++++++++++ | 38% ~07s
|++++++++++++++++++++ | 39% ~07s
|++++++++++++++++++++ | 40% ~07s
|+++++++++++++++++++++ | 41% ~06s
|+++++++++++++++++++++ | 42% ~06s
|++++++++++++++++++++++ | 43% ~06s
|++++++++++++++++++++++ | 44% ~06s
|+++++++++++++++++++++++ | 45% ~06s
|+++++++++++++++++++++++ | 46% ~06s
|++++++++++++++++++++++++ | 47% ~06s
|++++++++++++++++++++++++ | 48% ~06s
|+++++++++++++++++++++++++ | 49% ~06s
|+++++++++++++++++++++++++ | 50% ~05s
|++++++++++++++++++++++++++ | 51% ~05s
|++++++++++++++++++++++++++ | 52% ~05s
|+++++++++++++++++++++++++++ | 53% ~05s
|+++++++++++++++++++++++++++ | 54% ~05s
|++++++++++++++++++++++++++++ | 55% ~05s
|++++++++++++++++++++++++++++ | 56% ~05s
|+++++++++++++++++++++++++++++ | 57% ~05s
|+++++++++++++++++++++++++++++ | 58% ~05s
|++++++++++++++++++++++++++++++ | 59% ~04s
|++++++++++++++++++++++++++++++ | 60% ~04s
|+++++++++++++++++++++++++++++++ | 61% ~04s
|+++++++++++++++++++++++++++++++ | 62% ~04s
|++++++++++++++++++++++++++++++++ | 63% ~04s
|++++++++++++++++++++++++++++++++ | 64% ~04s
|+++++++++++++++++++++++++++++++++ | 65% ~04s
|+++++++++++++++++++++++++++++++++ | 66% ~04s
|++++++++++++++++++++++++++++++++++ | 67% ~04s
|++++++++++++++++++++++++++++++++++ | 68% ~03s
|+++++++++++++++++++++++++++++++++++ | 69% ~03s
|+++++++++++++++++++++++++++++++++++ | 70% ~03s
|++++++++++++++++++++++++++++++++++++ | 71% ~03s
|++++++++++++++++++++++++++++++++++++ | 72% ~03s
|+++++++++++++++++++++++++++++++++++++ | 73% ~03s
|+++++++++++++++++++++++++++++++++++++ | 74% ~03s
|++++++++++++++++++++++++++++++++++++++ | 75% ~03s
|++++++++++++++++++++++++++++++++++++++ | 76% ~03s
|+++++++++++++++++++++++++++++++++++++++ | 77% ~03s
|+++++++++++++++++++++++++++++++++++++++ | 78% ~02s
|++++++++++++++++++++++++++++++++++++++++ | 79% ~02s
|++++++++++++++++++++++++++++++++++++++++ | 80% ~02s
|+++++++++++++++++++++++++++++++++++++++++ | 81% ~02s
|+++++++++++++++++++++++++++++++++++++++++ | 82% ~02s
|++++++++++++++++++++++++++++++++++++++++++ | 83% ~02s
|++++++++++++++++++++++++++++++++++++++++++ | 84% ~02s
|+++++++++++++++++++++++++++++++++++++++++++ | 85% ~02s
|+++++++++++++++++++++++++++++++++++++++++++ | 86% ~02s
|++++++++++++++++++++++++++++++++++++++++++++ | 87% ~01s
|++++++++++++++++++++++++++++++++++++++++++++ | 88% ~01s
|+++++++++++++++++++++++++++++++++++++++++++++ | 89% ~01s
|+++++++++++++++++++++++++++++++++++++++++++++ | 90% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++ | 91% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++ | 92% ~01s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 93% ~01s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 94% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 95% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 96% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 97% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 98% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 99% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=11s
Calculating cluster 5
| | 0 % ~calculating
|+ | 1 % ~03s
|++ | 2 % ~02s
|++ | 3 % ~02s
|+++ | 4 % ~03s
|+++ | 5 % ~03s
|++++ | 6 % ~03s
|++++ | 7 % ~03s
|+++++ | 8 % ~03s
|+++++ | 9 % ~03s
|++++++ | 10% ~03s
|++++++ | 11% ~03s
|+++++++ | 12% ~03s
|+++++++ | 13% ~03s
|++++++++ | 14% ~03s
|++++++++ | 15% ~03s
|+++++++++ | 16% ~03s
|+++++++++ | 17% ~03s
|++++++++++ | 18% ~03s
|++++++++++ | 19% ~03s
|+++++++++++ | 20% ~02s
|+++++++++++ | 21% ~03s
|++++++++++++ | 22% ~03s
|++++++++++++ | 23% ~03s
|+++++++++++++ | 24% ~03s
|+++++++++++++ | 26% ~03s
|++++++++++++++ | 27% ~02s
|++++++++++++++ | 28% ~02s
|+++++++++++++++ | 29% ~02s
|+++++++++++++++ | 30% ~02s
|++++++++++++++++ | 31% ~02s
|++++++++++++++++ | 32% ~02s
|+++++++++++++++++ | 33% ~02s
|+++++++++++++++++ | 34% ~02s
|++++++++++++++++++ | 35% ~02s
|++++++++++++++++++ | 36% ~02s
|+++++++++++++++++++ | 37% ~02s
|+++++++++++++++++++ | 38% ~02s
|++++++++++++++++++++ | 39% ~02s
|++++++++++++++++++++ | 40% ~02s
|+++++++++++++++++++++ | 41% ~02s
|+++++++++++++++++++++ | 42% ~02s
|++++++++++++++++++++++ | 43% ~02s
|++++++++++++++++++++++ | 44% ~02s
|+++++++++++++++++++++++ | 45% ~02s
|+++++++++++++++++++++++ | 46% ~02s
|++++++++++++++++++++++++ | 47% ~02s
|++++++++++++++++++++++++ | 48% ~02s
|+++++++++++++++++++++++++ | 49% ~02s
|+++++++++++++++++++++++++ | 50% ~02s
|++++++++++++++++++++++++++ | 51% ~02s
|+++++++++++++++++++++++++++ | 52% ~02s
|+++++++++++++++++++++++++++ | 53% ~02s
|++++++++++++++++++++++++++++ | 54% ~02s
|++++++++++++++++++++++++++++ | 55% ~02s
|+++++++++++++++++++++++++++++ | 56% ~02s
|+++++++++++++++++++++++++++++ | 57% ~01s
|++++++++++++++++++++++++++++++ | 58% ~01s
|++++++++++++++++++++++++++++++ | 59% ~01s
|+++++++++++++++++++++++++++++++ | 60% ~01s
|+++++++++++++++++++++++++++++++ | 61% ~01s
|++++++++++++++++++++++++++++++++ | 62% ~01s
|++++++++++++++++++++++++++++++++ | 63% ~01s
|+++++++++++++++++++++++++++++++++ | 64% ~01s
|+++++++++++++++++++++++++++++++++ | 65% ~01s
|++++++++++++++++++++++++++++++++++ | 66% ~01s
|++++++++++++++++++++++++++++++++++ | 67% ~01s
|+++++++++++++++++++++++++++++++++++ | 68% ~01s
|+++++++++++++++++++++++++++++++++++ | 69% ~01s
|++++++++++++++++++++++++++++++++++++ | 70% ~01s
|++++++++++++++++++++++++++++++++++++ | 71% ~01s
|+++++++++++++++++++++++++++++++++++++ | 72% ~01s
|+++++++++++++++++++++++++++++++++++++ | 73% ~01s
|++++++++++++++++++++++++++++++++++++++ | 74% ~01s
|++++++++++++++++++++++++++++++++++++++ | 76% ~01s
|+++++++++++++++++++++++++++++++++++++++ | 77% ~01s
|+++++++++++++++++++++++++++++++++++++++ | 78% ~01s
|++++++++++++++++++++++++++++++++++++++++ | 79% ~01s
|++++++++++++++++++++++++++++++++++++++++ | 80% ~01s
|+++++++++++++++++++++++++++++++++++++++++ | 81% ~01s
|+++++++++++++++++++++++++++++++++++++++++ | 82% ~01s
|++++++++++++++++++++++++++++++++++++++++++ | 83% ~01s
|++++++++++++++++++++++++++++++++++++++++++ | 84% ~01s
|+++++++++++++++++++++++++++++++++++++++++++ | 85% ~01s
|+++++++++++++++++++++++++++++++++++++++++++ | 86% ~00s
|++++++++++++++++++++++++++++++++++++++++++++ | 87% ~00s
|++++++++++++++++++++++++++++++++++++++++++++ | 88% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++ | 89% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++ | 90% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++ | 91% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++ | 92% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 93% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 94% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 95% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 96% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 97% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 98% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 99% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=03s
Calculating cluster 6
| | 0 % ~calculating
|+ | 1 % ~04s
|++ | 2 % ~05s
|++ | 3 % ~05s
|+++ | 4 % ~05s
|+++ | 5 % ~05s
|++++ | 6 % ~05s
|++++ | 7 % ~05s
|+++++ | 8 % ~05s
|+++++ | 9 % ~05s
|++++++ | 10% ~05s
|++++++ | 11% ~05s
|+++++++ | 12% ~05s
|+++++++ | 13% ~05s
|++++++++ | 14% ~05s
|++++++++ | 15% ~05s
|+++++++++ | 16% ~05s
|+++++++++ | 17% ~05s
|++++++++++ | 18% ~05s
|++++++++++ | 19% ~05s
|+++++++++++ | 20% ~05s
|+++++++++++ | 21% ~05s
|++++++++++++ | 22% ~05s
|++++++++++++ | 23% ~05s
|+++++++++++++ | 24% ~04s
|+++++++++++++ | 25% ~04s
|++++++++++++++ | 26% ~04s
|++++++++++++++ | 27% ~04s
|+++++++++++++++ | 28% ~04s
|+++++++++++++++ | 29% ~04s
|++++++++++++++++ | 30% ~04s
|++++++++++++++++ | 31% ~04s
|+++++++++++++++++ | 32% ~04s
|+++++++++++++++++ | 33% ~04s
|++++++++++++++++++ | 34% ~04s
|++++++++++++++++++ | 35% ~04s
|+++++++++++++++++++ | 36% ~04s
|+++++++++++++++++++ | 37% ~04s
|++++++++++++++++++++ | 38% ~04s
|++++++++++++++++++++ | 39% ~04s
|+++++++++++++++++++++ | 40% ~04s
|+++++++++++++++++++++ | 41% ~04s
|++++++++++++++++++++++ | 42% ~04s
|++++++++++++++++++++++ | 43% ~03s
|+++++++++++++++++++++++ | 44% ~03s
|+++++++++++++++++++++++ | 45% ~03s
|++++++++++++++++++++++++ | 46% ~03s
|++++++++++++++++++++++++ | 47% ~03s
|+++++++++++++++++++++++++ | 48% ~03s
|+++++++++++++++++++++++++ | 49% ~03s
|++++++++++++++++++++++++++ | 51% ~03s
|++++++++++++++++++++++++++ | 52% ~03s
|+++++++++++++++++++++++++++ | 53% ~03s
|+++++++++++++++++++++++++++ | 54% ~03s
|++++++++++++++++++++++++++++ | 55% ~03s
|++++++++++++++++++++++++++++ | 56% ~03s
|+++++++++++++++++++++++++++++ | 57% ~03s
|+++++++++++++++++++++++++++++ | 58% ~03s
|++++++++++++++++++++++++++++++ | 59% ~03s
|++++++++++++++++++++++++++++++ | 60% ~03s
|+++++++++++++++++++++++++++++++ | 61% ~03s
|+++++++++++++++++++++++++++++++ | 62% ~02s
|++++++++++++++++++++++++++++++++ | 63% ~02s
|++++++++++++++++++++++++++++++++ | 64% ~02s
|+++++++++++++++++++++++++++++++++ | 65% ~02s
|+++++++++++++++++++++++++++++++++ | 66% ~02s
|++++++++++++++++++++++++++++++++++ | 67% ~02s
|++++++++++++++++++++++++++++++++++ | 68% ~02s
|+++++++++++++++++++++++++++++++++++ | 69% ~02s
|+++++++++++++++++++++++++++++++++++ | 70% ~02s
|++++++++++++++++++++++++++++++++++++ | 71% ~02s
|++++++++++++++++++++++++++++++++++++ | 72% ~02s
|+++++++++++++++++++++++++++++++++++++ | 73% ~02s
|+++++++++++++++++++++++++++++++++++++ | 74% ~02s
|++++++++++++++++++++++++++++++++++++++ | 75% ~02s
|++++++++++++++++++++++++++++++++++++++ | 76% ~02s
|+++++++++++++++++++++++++++++++++++++++ | 77% ~02s
|+++++++++++++++++++++++++++++++++++++++ | 78% ~01s
|++++++++++++++++++++++++++++++++++++++++ | 79% ~01s
|++++++++++++++++++++++++++++++++++++++++ | 80% ~01s
|+++++++++++++++++++++++++++++++++++++++++ | 81% ~01s
|+++++++++++++++++++++++++++++++++++++++++ | 82% ~01s
|++++++++++++++++++++++++++++++++++++++++++ | 83% ~01s
|++++++++++++++++++++++++++++++++++++++++++ | 84% ~01s
|+++++++++++++++++++++++++++++++++++++++++++ | 85% ~01s
|+++++++++++++++++++++++++++++++++++++++++++ | 86% ~01s
|++++++++++++++++++++++++++++++++++++++++++++ | 87% ~01s
|++++++++++++++++++++++++++++++++++++++++++++ | 88% ~01s
|+++++++++++++++++++++++++++++++++++++++++++++ | 89% ~01s
|+++++++++++++++++++++++++++++++++++++++++++++ | 90% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++ | 91% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++ | 92% ~01s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 93% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 94% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 95% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 96% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 97% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 98% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 99% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=07s
Calculating cluster 7
| | 0 % ~calculating
|+ | 1 % ~06s
|+ | 2 % ~07s
|++ | 3 % ~06s
|++ | 4 % ~06s
|+++ | 5 % ~06s
|+++ | 6 % ~06s
|++++ | 7 % ~06s
|++++ | 8 % ~06s
|+++++ | 9 % ~06s
|+++++ | 10% ~06s
|++++++ | 11% ~06s
|++++++ | 12% ~06s
|+++++++ | 13% ~07s
|+++++++ | 14% ~06s
|++++++++ | 15% ~06s
|++++++++ | 16% ~06s
|+++++++++ | 17% ~06s
|+++++++++ | 18% ~06s
|++++++++++ | 19% ~06s
|++++++++++ | 20% ~06s
|+++++++++++ | 21% ~06s
|+++++++++++ | 22% ~06s
|++++++++++++ | 23% ~06s
|++++++++++++ | 24% ~06s
|+++++++++++++ | 25% ~06s
|+++++++++++++ | 26% ~06s
|++++++++++++++ | 27% ~05s
|++++++++++++++ | 28% ~05s
|+++++++++++++++ | 29% ~05s
|+++++++++++++++ | 30% ~05s
|++++++++++++++++ | 31% ~05s
|++++++++++++++++ | 32% ~05s
|+++++++++++++++++ | 33% ~05s
|+++++++++++++++++ | 34% ~05s
|++++++++++++++++++ | 35% ~05s
|++++++++++++++++++ | 36% ~04s
|+++++++++++++++++++ | 37% ~04s
|+++++++++++++++++++ | 38% ~04s
|++++++++++++++++++++ | 39% ~04s
|++++++++++++++++++++ | 40% ~04s
|+++++++++++++++++++++ | 41% ~04s
|+++++++++++++++++++++ | 42% ~04s
|++++++++++++++++++++++ | 43% ~04s
|++++++++++++++++++++++ | 44% ~04s
|+++++++++++++++++++++++ | 45% ~04s
|+++++++++++++++++++++++ | 46% ~04s
|++++++++++++++++++++++++ | 47% ~03s
|++++++++++++++++++++++++ | 48% ~03s
|+++++++++++++++++++++++++ | 49% ~03s
|+++++++++++++++++++++++++ | 50% ~03s
|++++++++++++++++++++++++++ | 51% ~03s
|++++++++++++++++++++++++++ | 52% ~03s
|+++++++++++++++++++++++++++ | 53% ~03s
|+++++++++++++++++++++++++++ | 54% ~03s
|++++++++++++++++++++++++++++ | 55% ~03s
|++++++++++++++++++++++++++++ | 56% ~03s
|+++++++++++++++++++++++++++++ | 57% ~03s
|+++++++++++++++++++++++++++++ | 58% ~03s
|++++++++++++++++++++++++++++++ | 59% ~03s
|++++++++++++++++++++++++++++++ | 60% ~03s
|+++++++++++++++++++++++++++++++ | 61% ~03s
|+++++++++++++++++++++++++++++++ | 62% ~03s
|++++++++++++++++++++++++++++++++ | 63% ~02s
|++++++++++++++++++++++++++++++++ | 64% ~02s
|+++++++++++++++++++++++++++++++++ | 65% ~02s
|+++++++++++++++++++++++++++++++++ | 66% ~02s
|++++++++++++++++++++++++++++++++++ | 67% ~02s
|++++++++++++++++++++++++++++++++++ | 68% ~02s
|+++++++++++++++++++++++++++++++++++ | 69% ~02s
|+++++++++++++++++++++++++++++++++++ | 70% ~02s
|++++++++++++++++++++++++++++++++++++ | 71% ~02s
|++++++++++++++++++++++++++++++++++++ | 72% ~02s
|+++++++++++++++++++++++++++++++++++++ | 73% ~02s
|+++++++++++++++++++++++++++++++++++++ | 74% ~02s
|++++++++++++++++++++++++++++++++++++++ | 75% ~02s
|++++++++++++++++++++++++++++++++++++++ | 76% ~02s
|+++++++++++++++++++++++++++++++++++++++ | 77% ~01s
|+++++++++++++++++++++++++++++++++++++++ | 78% ~01s
|++++++++++++++++++++++++++++++++++++++++ | 79% ~01s
|++++++++++++++++++++++++++++++++++++++++ | 80% ~01s
|+++++++++++++++++++++++++++++++++++++++++ | 81% ~01s
|+++++++++++++++++++++++++++++++++++++++++ | 82% ~01s
|++++++++++++++++++++++++++++++++++++++++++ | 83% ~01s
|++++++++++++++++++++++++++++++++++++++++++ | 84% ~01s
|+++++++++++++++++++++++++++++++++++++++++++ | 85% ~01s
|+++++++++++++++++++++++++++++++++++++++++++ | 86% ~01s
|++++++++++++++++++++++++++++++++++++++++++++ | 87% ~01s
|++++++++++++++++++++++++++++++++++++++++++++ | 88% ~01s
|+++++++++++++++++++++++++++++++++++++++++++++ | 89% ~01s
|+++++++++++++++++++++++++++++++++++++++++++++ | 90% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++ | 91% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++ | 92% ~01s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 93% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 94% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 95% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 96% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 97% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 98% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 99% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=06s
Calculating cluster 8
| | 0 % ~calculating
|+ | 1 % ~02s
|++ | 2 % ~02s
|++ | 3 % ~02s
|+++ | 4 % ~02s
|+++ | 5 % ~02s
|++++ | 6 % ~02s
|++++ | 7 % ~02s
|+++++ | 8 % ~02s
|+++++ | 9 % ~02s
|++++++ | 10% ~02s
|++++++ | 11% ~02s
|+++++++ | 12% ~02s
|+++++++ | 13% ~02s
|++++++++ | 14% ~02s
|++++++++ | 15% ~02s
|+++++++++ | 16% ~02s
|+++++++++ | 17% ~02s
|++++++++++ | 18% ~02s
|++++++++++ | 19% ~02s
|+++++++++++ | 20% ~02s
|+++++++++++ | 21% ~02s
|++++++++++++ | 22% ~03s
|++++++++++++ | 23% ~03s
|+++++++++++++ | 24% ~03s
|+++++++++++++ | 26% ~03s
|++++++++++++++ | 27% ~03s
|++++++++++++++ | 28% ~03s
|+++++++++++++++ | 29% ~03s
|+++++++++++++++ | 30% ~03s
|++++++++++++++++ | 31% ~02s
|++++++++++++++++ | 32% ~02s
|+++++++++++++++++ | 33% ~02s
|+++++++++++++++++ | 34% ~02s
|++++++++++++++++++ | 35% ~02s
|++++++++++++++++++ | 36% ~02s
|+++++++++++++++++++ | 37% ~02s
|+++++++++++++++++++ | 38% ~02s
|++++++++++++++++++++ | 39% ~02s
|++++++++++++++++++++ | 40% ~02s
|+++++++++++++++++++++ | 41% ~02s
|+++++++++++++++++++++ | 42% ~02s
|++++++++++++++++++++++ | 43% ~02s
|++++++++++++++++++++++ | 44% ~02s
|+++++++++++++++++++++++ | 45% ~02s
|+++++++++++++++++++++++ | 46% ~02s
|++++++++++++++++++++++++ | 47% ~02s
|++++++++++++++++++++++++ | 48% ~02s
|+++++++++++++++++++++++++ | 49% ~02s
|+++++++++++++++++++++++++ | 50% ~02s
|++++++++++++++++++++++++++ | 51% ~02s
|+++++++++++++++++++++++++++ | 52% ~02s
|+++++++++++++++++++++++++++ | 53% ~02s
|++++++++++++++++++++++++++++ | 54% ~02s
|++++++++++++++++++++++++++++ | 55% ~02s
|+++++++++++++++++++++++++++++ | 56% ~02s
|+++++++++++++++++++++++++++++ | 57% ~02s
|++++++++++++++++++++++++++++++ | 58% ~02s
|++++++++++++++++++++++++++++++ | 59% ~01s
|+++++++++++++++++++++++++++++++ | 60% ~01s
|+++++++++++++++++++++++++++++++ | 61% ~01s
|++++++++++++++++++++++++++++++++ | 62% ~01s
|++++++++++++++++++++++++++++++++ | 63% ~01s
|+++++++++++++++++++++++++++++++++ | 64% ~01s
|+++++++++++++++++++++++++++++++++ | 65% ~01s
|++++++++++++++++++++++++++++++++++ | 66% ~01s
|++++++++++++++++++++++++++++++++++ | 67% ~01s
|+++++++++++++++++++++++++++++++++++ | 68% ~01s
|+++++++++++++++++++++++++++++++++++ | 69% ~01s
|++++++++++++++++++++++++++++++++++++ | 70% ~01s
|++++++++++++++++++++++++++++++++++++ | 71% ~01s
|+++++++++++++++++++++++++++++++++++++ | 72% ~01s
|+++++++++++++++++++++++++++++++++++++ | 73% ~01s
|++++++++++++++++++++++++++++++++++++++ | 74% ~01s
|++++++++++++++++++++++++++++++++++++++ | 76% ~01s
|+++++++++++++++++++++++++++++++++++++++ | 77% ~01s
|+++++++++++++++++++++++++++++++++++++++ | 78% ~01s
|++++++++++++++++++++++++++++++++++++++++ | 79% ~01s
|++++++++++++++++++++++++++++++++++++++++ | 80% ~01s
|+++++++++++++++++++++++++++++++++++++++++ | 81% ~01s
|+++++++++++++++++++++++++++++++++++++++++ | 82% ~01s
|++++++++++++++++++++++++++++++++++++++++++ | 83% ~01s
|++++++++++++++++++++++++++++++++++++++++++ | 84% ~01s
|+++++++++++++++++++++++++++++++++++++++++++ | 85% ~01s
|+++++++++++++++++++++++++++++++++++++++++++ | 86% ~01s
|++++++++++++++++++++++++++++++++++++++++++++ | 87% ~01s
|++++++++++++++++++++++++++++++++++++++++++++ | 88% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++ | 89% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++ | 90% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++ | 91% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++ | 92% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 93% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 94% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 95% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 96% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 97% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 98% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 99% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=04s
Calculating cluster 9
| | 0 % ~calculating
|+ | 1 % ~03s
|++ | 2 % ~04s
|++ | 3 % ~04s
|+++ | 4 % ~04s
|+++ | 5 % ~04s
|++++ | 7 % ~04s
|++++ | 8 % ~04s
|+++++ | 9 % ~04s
|+++++ | 10% ~04s
|++++++ | 11% ~04s
|++++++ | 12% ~04s
|+++++++ | 13% ~04s
|++++++++ | 14% ~04s
|++++++++ | 15% ~04s
|+++++++++ | 16% ~04s
|+++++++++ | 17% ~04s
|++++++++++ | 18% ~04s
|++++++++++ | 20% ~04s
|+++++++++++ | 21% ~04s
|+++++++++++ | 22% ~04s
|++++++++++++ | 23% ~04s
|++++++++++++ | 24% ~04s
|+++++++++++++ | 25% ~04s
|++++++++++++++ | 26% ~04s
|++++++++++++++ | 27% ~04s
|+++++++++++++++ | 28% ~04s
|+++++++++++++++ | 29% ~04s
|++++++++++++++++ | 30% ~04s
|++++++++++++++++ | 32% ~03s
|+++++++++++++++++ | 33% ~03s
|+++++++++++++++++ | 34% ~03s
|++++++++++++++++++ | 35% ~03s
|++++++++++++++++++ | 36% ~03s
|+++++++++++++++++++ | 37% ~03s
|++++++++++++++++++++ | 38% ~03s
|++++++++++++++++++++ | 39% ~03s
|+++++++++++++++++++++ | 40% ~03s
|+++++++++++++++++++++ | 41% ~03s
|++++++++++++++++++++++ | 42% ~03s
|++++++++++++++++++++++ | 43% ~03s
|+++++++++++++++++++++++ | 45% ~03s
|+++++++++++++++++++++++ | 46% ~03s
|++++++++++++++++++++++++ | 47% ~03s
|++++++++++++++++++++++++ | 48% ~03s
|+++++++++++++++++++++++++ | 49% ~02s
|+++++++++++++++++++++++++ | 50% ~02s
|++++++++++++++++++++++++++ | 51% ~02s
|+++++++++++++++++++++++++++ | 52% ~02s
|+++++++++++++++++++++++++++ | 53% ~02s
|++++++++++++++++++++++++++++ | 54% ~02s
|++++++++++++++++++++++++++++ | 55% ~02s
|+++++++++++++++++++++++++++++ | 57% ~02s
|+++++++++++++++++++++++++++++ | 58% ~02s
|++++++++++++++++++++++++++++++ | 59% ~02s
|++++++++++++++++++++++++++++++ | 60% ~02s
|+++++++++++++++++++++++++++++++ | 61% ~02s
|+++++++++++++++++++++++++++++++ | 62% ~02s
|++++++++++++++++++++++++++++++++ | 63% ~02s
|+++++++++++++++++++++++++++++++++ | 64% ~02s
|+++++++++++++++++++++++++++++++++ | 65% ~02s
|++++++++++++++++++++++++++++++++++ | 66% ~02s
|++++++++++++++++++++++++++++++++++ | 67% ~02s
|+++++++++++++++++++++++++++++++++++ | 68% ~01s
|+++++++++++++++++++++++++++++++++++ | 70% ~01s
|++++++++++++++++++++++++++++++++++++ | 71% ~01s
|++++++++++++++++++++++++++++++++++++ | 72% ~01s
|+++++++++++++++++++++++++++++++++++++ | 73% ~01s
|+++++++++++++++++++++++++++++++++++++ | 74% ~01s
|++++++++++++++++++++++++++++++++++++++ | 75% ~01s
|+++++++++++++++++++++++++++++++++++++++ | 76% ~01s
|+++++++++++++++++++++++++++++++++++++++ | 77% ~01s
|++++++++++++++++++++++++++++++++++++++++ | 78% ~01s
|++++++++++++++++++++++++++++++++++++++++ | 79% ~01s
|+++++++++++++++++++++++++++++++++++++++++ | 80% ~01s
|+++++++++++++++++++++++++++++++++++++++++ | 82% ~01s
|++++++++++++++++++++++++++++++++++++++++++ | 83% ~01s
|++++++++++++++++++++++++++++++++++++++++++ | 84% ~01s
|+++++++++++++++++++++++++++++++++++++++++++ | 85% ~01s
|+++++++++++++++++++++++++++++++++++++++++++ | 86% ~01s
|++++++++++++++++++++++++++++++++++++++++++++ | 87% ~01s
|+++++++++++++++++++++++++++++++++++++++++++++ | 88% ~01s
|+++++++++++++++++++++++++++++++++++++++++++++ | 89% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++ | 90% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++ | 91% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 92% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 93% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 95% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 96% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 97% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 98% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 99% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=05s
Here, not like previously, we will just take top10 genes to make a heatmap. Note that putting too much of genes on heatmap is not informative!
Also, you could save the heatmap by using ggsave() function, with setting the width and height of plot.
Not only with the FindAllMarkers function, Seurat provides several tools for visualizing marker expression. The first one is called violin plot.
For VlnPlot(), we could put several genes by using combination, c().
VlnPlot(filt.seuset, features = c("Esr1", "Acta2", "Elf5"), ncol=1)
What if we would like to see the gene expression on the UMAP directly, rather than checking the violin plot? FeaturePlot() will help you! It is exactly same as VlnPlot().
Putting three or four genes in the function using c() would not be something bothered. However, what if we have like 20 genes to check? In this case, we could declare the list of genes we would like to see, then make the plotting as loop!
feature <- function(x) {
FeaturePlot(filt.seuset,features =x)
}
dir.create("Feature_Filt")
pathdir <- file.path("Feature_Filt")
for (i in 1:length(gene_list)){
feature(gene_list[i])
ggsave(path = pathdir, paste(gene_list[i],"_FeaturePlot.pdf",sep=""), width = 20, height = 20, units = "cm")
}
violin <- function(x) {
VlnPlot(filt.seuset, features = x)
}
dir.create("Violin_Filt")
pathdir <- file.path("Violin_Filt")
for (i in 1:length(gene_list)){
violin(gene_list[i])
ggsave(path = pathdir, paste(gene_list[i],"_ViolinPlot.pdf",sep=""), width = 20, height = 20, units = "cm")
}
sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 11.2.2
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] magrittr_2.0.1 data.table_1.14.0 forcats_0.5.1 stringr_1.4.0 dplyr_1.0.7
[6] purrr_0.3.4 readr_1.4.0 tidyr_1.1.3 tibble_3.1.2 tidyverse_1.3.1
[11] patchwork_1.1.1 ggplot2_3.3.5 SeuratObject_4.0.2 Seurat_4.0.3
loaded via a namespace (and not attached):
[1] Rtsne_0.15 colorspace_2.0-2 deldir_0.2-10 ellipsis_0.3.2
[5] ggridges_0.5.3 fs_1.5.0 rstudioapi_0.13 spatstat.data_2.1-0
[9] farver_2.1.0 leiden_0.3.8 listenv_0.8.0 ggrepel_0.9.1
[13] RSpectra_0.16-0 lubridate_1.7.10 fansi_0.5.0 xml2_1.3.2
[17] codetools_0.2-18 splines_4.1.0 knitr_1.33 polyclip_1.10-0
[21] jsonlite_1.7.2 broom_0.7.8 ica_1.0-2 cluster_2.1.2
[25] dbplyr_2.1.1 png_0.1-7 uwot_0.1.10 shiny_1.6.0
[29] sctransform_0.3.2 spatstat.sparse_2.0-0 compiler_4.1.0 httr_1.4.2
[33] backports_1.2.1 assertthat_0.2.1 Matrix_1.3-4 fastmap_1.1.0
[37] lazyeval_0.2.2 limma_3.48.1 cli_3.0.1 later_1.2.0
[41] htmltools_0.5.1.1 tools_4.1.0 igraph_1.2.6 gtable_0.3.0
[45] glue_1.4.2 RANN_2.6.1 reshape2_1.4.4 Rcpp_1.0.7
[49] scattermore_0.7 jquerylib_0.1.4 cellranger_1.1.0 vctrs_0.3.8
[53] nlme_3.1-152 lmtest_0.9-38 xfun_0.24 globals_0.14.0
[57] rvest_1.0.0 mime_0.11 miniUI_0.1.1.1 lifecycle_1.0.0
[61] irlba_2.3.3 goftest_1.2-2 future_1.21.0 MASS_7.3-54
[65] zoo_1.8-9 scales_1.1.1 spatstat.core_2.3-0 hms_1.1.0
[69] promises_1.2.0.1 spatstat.utils_2.2-0 parallel_4.1.0 RColorBrewer_1.1-2
[73] yaml_2.2.1 reticulate_1.20 pbapply_1.4-3 gridExtra_2.3
[77] sass_0.4.0 rpart_4.1-15 stringi_1.7.3 rlang_0.4.11
[81] pkgconfig_2.0.3 matrixStats_0.59.0 evaluate_0.14 lattice_0.20-44
[85] ROCR_1.0-11 tensor_1.5 labeling_0.4.2 htmlwidgets_1.5.3
[89] cowplot_1.1.1 tidyselect_1.1.1 parallelly_1.27.0 RcppAnnoy_0.0.18
[93] plyr_1.8.6 R6_2.5.0 generics_0.1.0 DBI_1.1.1
[97] pillar_1.6.1 haven_2.4.1 withr_2.4.2 mgcv_1.8-36
[101] fitdistrplus_1.1-5 survival_3.2-11 abind_1.4-5 future.apply_1.7.0
[105] modelr_0.1.8 crayon_1.4.1 KernSmooth_2.23-20 utf8_1.2.1
[109] spatstat.geom_2.2-2 plotly_4.9.4.1 rmarkdown_2.9 readxl_1.3.1
[113] grid_4.1.0 reprex_2.0.0 digest_0.6.27 xtable_1.8-4
[117] httpuv_1.6.1 munsell_0.5.0 viridisLite_0.4.0 bslib_0.2.5.1